<ion-view view-title="产品详情" cache-view="false">
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">

        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>

        <!-- unlimited -->
        <div class="unlimited unlimited-item">
            <!-- item -->
            <div class="on">
                <div class="hd">
                    <concern></concern>
                    <h2 class="prodName">{{fund.prod_name | defString }}<em>{{fund.prod_code | defString }}</em></h2>
                </div>
                <!-- income items -->
                <ul class="income-items clearfix">
                    <li>
                        预期收益率<em class="{{fund.prod_profit_rate>=0 ? 'inc' : 'inc_'}}">{{fund.prod_profit_rate | defNumber:4}}<sub>%</sub></em>
                    </li>
                    <li>起购金额<em ng-bind-html="fund.prod_min_share"></em></li>
                </ul>
                <!-- progress -->
                <div ng-if="fund.sellStatus == 1 || fund.sellStatus == 2">
                    <div class="progress">
                        <h3>剩余额度：{{(info.total_quota - info.used_quota) / 10000 | defNumber : 0}}万元</h3>
                        <p><i style="width:{{info.used_quota / info.total_quota * 100 | defNumber : 2}}%"></i></p>
                        <h3>剩余人数：{{info.max_holder_num - info.curr_holder_num | defNumber :0}}人</h3>
                        <p><i style="width:{{info.curr_holder_num / info.max_holder_num * 100 | defNumber : 2}}%"></i></p>
                    </div>
                    <div class="little-tip">• 剩余额度或剩余人数中任何一项为零即产品售罄</div>
                </div>
                <time>数据更新日期：<span>{{ today | date:'yyyy-MM-dd'}}</span></time>
            </div>
        </div>
        <!-- panel -->
        <div class="panel">
            <div class="item">
                <span class="title">产品类型</span>
                <span class="rtl">{{fund.prod_catalog_name | defString}}</span>
            </div>
            <div class="item">
                <a>
                    <span class="title">期限</span>
                    <span class="rtl">{{fund.prod_duration | defNumber : null :'天'}}</span>
                </a>
            </div>
            <div class="item">
                <span class="title">风险等级</span>
                <span class="rtl">{{fund.prod_risk_level | dictionary : 'prodRisks'}}</span>
            </div>
            <div class="item group">
                <a href="#/tab/product-detail-otc/{{fund.prod_code}}">了解更多产品详情</a>
            </div>
        </div>
        <div class="little-tip">基金有风险，投资需谨慎！购买前需仔细阅读基金合同和招募说明书等法律文件。</div>
    </ion-content>

    <ion-footer-bar class="footer">
        <dl>
            <!--<dt ng-if="fund.is_entrust=='1'">费率：<em>{{fund.prod_rate | defNumber: 2}}</em>% </dt>-->
            <dt><a ng-href="#/tab/product-rate/{{fund.prod_id}}">费率：<em id="prodCharge">{{fund.prod_rate | defNumber: 2}}</em>% </a></dt>
            <dd>
                <a ng-if="fund.sellStatus == 1" class="btn"
                    buy-button prod_code="{{fund.prod_code}}" prod_source="{{fund.prod_source}}" >购买</a>
                <a ng-if="fund.sellStatus == 2" class="btn disable">购买</a>
                <a ng-if="fund.sellStatus == 3" class="btn disable">已售罄</a>
                <a ng-if="fund.sellStatus == 4" class="btn disable">暂停申购</a>
                <a ng-if="fund.sellStatus == 5" class="btn disable">暂停交易</a>
            </dd>
        </dl>
    </ion-footer-bar>
</ion-view>